package day10_io_code.com.itheima.d1_char_stream;

import java.io.FileReader;
import java.io.IOException;

public class FileReaderDemo1 {
    public static void main(String[] args) throws IOException {
        FileReader fr = new FileReader("dlei.txt");
        int c1 = fr.read();
        System.out.println((char) c1);

        int c2 = fr.read();
        System.out.println((char) c2);

        int c3 = fr.read();
        System.out.println((char) c3);
        int c;
        while ((c = fr.read()) != -1){
            char ch = (char) c;

        }
        fr.close();
    }
}
